<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <%@include file="/static/js/common.jsp" %>

    <script type="text/javascript" src="/static/js/train.js"></script>
</head>
<body class="easyui-layout">
    <div data-options="region:'north',title:'查询添加'" style="height:100px;">
        <div>
            <table  align="center"
                   style="margin:15px;border-spacing:8px;border-collapse:separate; border-spacing:8px;">
                <tr>
                    <td>关键字:</td>
                    <td>
                        <input type="text" class="easyui-textbox" id="keyword" name="keyword" prompt="请输入培训名称">
                    </td>
                    <td>部门:</td>
                    <td>
                        <input type="text" class="easyui-combobox" id="deptId" name="deptId" prompt="请选择"
                               data-options="url:'/department/selectAll.do',textField:'name',valueField:'id',panelHeight:'auto'">
                    </td>
                    <td>申请人姓名:</td>
                    <td>
                        <input type="text" class="easyui-combobox" id="employeeId"  name="employeeId" prompt="请选择"
                               data-options="url:'/train/selectByEmployee.do',textField:'realname',valueField:'id'">
                    </td>
                    <td>开始时间:</td>
                    <td>
                        <input type="text" class="easyui-datebox" id="beginDate" name="beginDate">
                    </td>
                    <td>结束时间:</td>
                    <td>
                        <input type="text" class="easyui-datebox" id="endDate" name="endDate">
                    </td>
                    <td>
                        <a href="#" class="easyui-linkbutton" onclick="cearchForm()"  data-options="iconCls:'icon-search',plain:true">查询</a>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div data-options="region:'center',title:'用人需求申请列表'">
        <table id="myGrid"></table>

        <div id="tb">
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="add()">新增</a>
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="edit()">编辑</a>
            <a href="#" class="easyui-linkbutton" id="changeState_btn" data-options="iconCls:'icon-remove',plain:true"
               onclick="changeState()">删除</a>
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
               onclick="reload()">刷新</a>
        </div>

        <div id="form_btn">
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="save()">保存</a>
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true"
               onclick="cancel()">取消</a>
        </div>

        <div id="myDialog">
            <form id="myForm" method="post">
                <input type="hidden" name="id"/>
                <table style="margin:15px;border-spacing:8px;border-collapse:separate; border-spacing:8px;">
                    <tr>
                        <td>申请部门: <input name="dept.id" class="easyui-combobox" prompt="请选择"
                                         data-options="url:'/department/selectAll.do',textField:'name',valueField:'id',panelHeight:'auto'">
                        </td>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;申请人: <input name="employee.id" class="easyui-combobox" prompt="请选择"
                                                                data-options="url:'/train/selectByEmployee.do',textField:'realname',valueField:'id'">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;申请时间:<input name="applyDate" type="text" class="easyui-datebox"
                                              required="required"> </input>
                        </td>
                        <td>
                            培训名称: <input name="name" class="easyui-textbox" data-options="iconCls:'icon-search'">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            培训类型: <input class="easyui-combobox" name="type" prompt="请选择"
                                         data-options="data:[{
                                                    'value':'0',
                                                    'text':'外培'
                                                },{
                                                    'value':'1',
                                                    'text':'内培'
                                                }
                                               ],textField:'text',valueField:'value',panelHeight:'auto'">
                        </td>
                        <td>
                            培训机构: <input name="organization" class="easyui-textbox"
                                         data-options="iconCls:'icon-search'">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            预计费用: <input name="totalNumber" class="easyui-textbox" data-options="iconCls:'icon-search'">
                        </td>
                        <td>
                            培训场地: <input prompt="请输入具体的培训地址" name="trainAddress" class="easyui-textbox"
                                         data-options="iconCls:'icon-search'">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            开始时间: <input name="beginDate" type="text" class="easyui-datebox"
                                         required="required"> </input>
                        </td>
                        <td>
                            结束时间: <input name="endDate" type="text" class="easyui-datebox" required="required"> </input>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            培训时长: <input name="duration" class="easyui-textbox" data-options="iconCls:'icon-search'"
                                         prompt="请输入培训的天数">
                        </td>
                    </tr>
                    <tr>
                        <td>培训目的: <input name="target" multiline="true" class="easyui-textbox"
                                         style="width:300px;height:50px;"></td>
                    </tr>
                    <tr>
                        <td>培训内容: <input name="content" multiline="true" class="easyui-textbox"
                                         style="width:300px;height:50px;"></td>
                    </tr>
                    <tr>
                        <td>培训备注: <input name="remark" multiline="true" class="easyui-textbox"
                                         style="width:300px;height:50px;"></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    </form>
</body>
</html>
